package com.tch;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @EnableScheduling 开启定时任务
 * @MapperScan 可以指定要扫描的Mapper类的包的路径
 * @EnableAsync 异步注解(启动) 需要在方法上添加 @Async 注解结合使用（@Async实际就是多线程封装的）
 */
@SpringBootApplication
@MapperScan("com.tch.mapper")
@EnableScheduling
@EnableAsync
public class SpringbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }

    /**
     * 扫包范围 D:\IJworkspace\springboot\src\main\java\com\tch\springboot
     * 当前启动类同级包或者子包
     *
     * @MapperScan("com.tch.mapper")  需要注入导容器
     */
}
